﻿using System;

namespace Lhz.Serialization
{
    public abstract class Serializer<T> : ISerializer<T>
    {
        public abstract T Serialize<TObject>(TObject item);

        public abstract object Deserialize(Type type, T content);

        public virtual TObject Deserialize<TObject>(T content)
        {
            return (TObject)Deserialize(typeof(TObject), content);
        }
    }
}
